<?php

namespace api\system\controller;

class AdminSettingController extends \Aaa\system\controller\AdminSettingController {

    public function beforeIndex() {
        $this->baseField = [
            [
                'field' => 'uploadImageZoom',
                'name' => '上传图像压缩',
                'type' => 'switch',
                'remark' => '启用后，下面的设置才生效',
            ],
            [
                'field' => 'uploadImageQuality',
                'name' => '图像质量',
                'remark' => '0-100，建议80',
            ],
            [
                'field' => 'uploadImageMaxWidth',
                'name' => '最大宽度',
                'remark' => '单位：px',
            ],
            [
                'field' => 'uploadImageMaxHeight',
                'name' => '最大高度',
                'remark' => '单位：px',
            ],
        ];
        //$this->actionField = ['uploadImageZoom', 'uploadImageMaxWidth', 'uploadImageMaxHeight'];
    }

    public function beforeSite() {
        $this->baseField = [
            [
                'field' => 'siteName',
                'name' => '平台名称',
            ],
            [
                'field' => 'h5Url',
                'name' => 'H5端网址',
                'remark' => '带http或https，示例：https://h5.pnsss.com/',
            ],
            [
                'field' => 'mobileLogo',
                'name' => '移动端LOGO',
                'type' => 'image',
                'remark' => '此设置为运行APP后显示的LOGO。安装APP后，在手机桌面显示的LOGO需要在打包的时候单独上传',
            ],
            [
                'field' => 'appAndroidDownloadUrl',
                'name' => 'APP下载地址',
                'remark' => 'Android',
            ],
            [
                'field' => 'appIosDownloadUrl',
                'name' => 'APP下载地址',
                'remark' => 'iOS',
            ],
            [
                'field' => 'appVersion',
                'name' => 'APP版本号',
                'remark' =>'请保持和Hbuilder打包的版本号一致，若当前版本号和安装的APP版本号不一致，强制用户升级',
            ],
            [
                'field' => 'updateTip',
                'name' => '更新说明',
                'type' => 'textarea',
            ],
            [
                'field' => 'pcUrl',
                'name' => 'PC端网址',
                'remark' => '带http或https，示例：https://pc.pnsss.com/',
            ],
            [
                'field' => 'pcLogo',
                'name' => 'PC端LOGO',
                'type' => 'image',
                'remark' => '最佳尺寸：400px * 120px',
            ],
            [
                'field' => 'icp',
                'name' => 'ICP备案号',
            ],
            [
                'field' => 'gwa',
                'name' => '公网安备案号'
            ],
            [
                'field' => 'bottomInfo',
                'name' => '底部信息',
                'type' => 'textarea',
            ],
        ];
    }

}
